package cn.chengpengper.seckill.stock.application.model.command;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author chengpeng.hu
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SeckillStockBucketCommand implements Serializable {
    private static final long serialVersionUID = 5541107936872329915L;
    //总库存
    private Integer totalStock;
    //分桶数量
    private Integer bucketsQuantity;
    //分桶编排模式, 1:总量模式  2：增量模式
    private Integer arrangementMode;


    public boolean isEmpty(){
        return this.totalStock == null
                || this.bucketsQuantity == null
                || this.arrangementMode == null;
    }
}

